// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

using System.Text;

namespace KnessetCore.Utils
{
	/// <summary>
	/// Holds three types of objects.
	/// </summary>
	/// <typeparam name="T">Type of first object.</typeparam>
	/// <typeparam name="V">Type of second object.</typeparam>
	/// <typeparam name="U">Type of third object.</typeparam>
	public class Triplet<T,V,U>
	{
		private T value1;
		private V value2;
		private U value3;


		public Triplet(T value1, V value2, U value3)
		{
			this.value1 = value1;
			this.value2 = value2;
			this.value3 = value3;
		}


		public T Value1
		{
			get { return value1; }
			set
			{
				value1 = value;
			}
		}

		public V Value2
		{
			get { return value2; }
			set
			{
				value2 = value;
			}
		}

		public U Value3
		{
			get { return value3; }
			set
			{
				value3 = value;
			}
		}


		///<summary>
		///Returns a <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.
		///</summary>
		///
		///<returns>
		///A <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.
		///</returns>
		///<filterpriority>2</filterpriority>
		public override string ToString()
		{
			return string.Format("<{0},{1},{2}>", value1.ToString(), value2.ToString(), value3.ToString());
		}
	}
}